<%@page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@include file="/includes/taglibs.jsp"%>
<%@page import="com.feib.soeasy.model.MenuItem"%>
<%@page import="com.feib.soeasy.util.UserUtil"%>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.Set"%>
<%@page import="net.sourceforge.stripes.action.ActionBean"%>

<%

if (null == UserUtil.getUser() ){ 
%>
	<dl id="corpPayment">
		<dt><a href="#">繳費客戶 PAYMENT</a></dt>
		<dd>
			<ul>
				<li><a href="<c:url value='/Soez1001.action'/>">學雜費繳費</a></li>				
				<li><a href="<c:url value='/Soez1002.action'/>">一般帳單繳費</a></li>
				<li><a href="<c:url value='/Soez1007.action'/>">分期付款繳費</a></li>
				<li><a href="<c:url value='/Soez1003.action'/>">學雜費繳費進度查詢</a></li>
				<li><a href="<c:url value='/Soez1004.action'/>">一般帳單繳費進度查詢</a></li>
				<li><a href="<c:url value='/Soez1008.action'/>">分期付款繳費進度查詢</a></li>
				<li><a href="<c:url value='/Soez1005.action'/>">繳費說明</a></li>
			</ul>
		</dd>
	</dl>
<%
} 
else 
{
    if (UserUtil.isBankGroup()) { %>
	<dl id="corpAdm">
		<dt><a href="#">銀行端</a></dt>
	<% } else { %>
	<dl id="corpBill">
		<dt><a href="#">帳單業者 BILL</a></dt>
<% } %>
		<dd>
			<ul>

<%

Map<MenuItem, Set<MenuItem>> menus = UserUtil.getUserMenuItems();

if (null != menus)
{
	Set<MenuItem> mainMenus = menus.keySet();
	MenuItem currentMenuItem = UserUtil.getCurrentMenuItem();
	for(Iterator<MenuItem> i = mainMenus.iterator(); i.hasNext();)
	{
		MenuItem item = (MenuItem)i.next();
		MenuItem firstSubItem = null;
		Set<MenuItem> subMenus = menus.get(item);
		for(Iterator<MenuItem> j = subMenus.iterator(); j.hasNext();)
		{
		    firstSubItem = (MenuItem)j.next();
		    break;
		}
		
		request.setAttribute("firstSubItem", null == firstSubItem ? "" : firstSubItem.getActionPage());
		
	    if (null != currentMenuItem && item.equals(currentMenuItem.getParentMenuItem()))
	        request.setAttribute("activePageClass", "now");
	    else
	        request.setAttribute("activePageClass", "");
%>
				<li class="<c:out value='${activePageClass}'/>"><a href="<c:url value='${firstSubItem }'/>" ><%=item.getActionName() %></a></li>
<%			
	}
}
%>
					</ul>
				</dd>
			</dl>
<%} %>


			<!-- ************** 常用連結 start *************** -->
			<div id="outLinkBlock">
				<ul>
					<li><a href="https://b2b.feib.com.tw/wps/doc/zh_TW/rate.html" target="_blank">匯率利率</a></li>
					<li><a href="http://infeib.moneydj.com/r/rMain.asp.HTM" target="_blank">即時金融訊息</a></li>
					<li><a href="http://infeib.moneydj.com/R/RC/RCB.asp.htm" target="_blank">最新財金訊息</a></li>
					<li><a href="<c:url value='/Soez1006.action'/>">表單下載</a></li>
				</ul>
			</div>
			<!-- ************** 常用連結 end *************** -->
